package main

import "fmt"

/**
方法1
*/

type Student struct {
	id   int
	name string
	age  int
}

func (stu Student) display() {
	//int类型的不能用+只能用，
	fmt.Println("ID:", stu.id, "    姓名:", stu.name+"    年龄:", stu.age)
}

func (stu Student) getDisplay() Student {
	return stu
}
func main() {
	stu := Student{
		id:   1,
		name: "ZS",
		age:  100,
	}
	stu.display()
	display:= stu.getDisplay()
	fmt.Println(display)
}
